package com.kitty.game.gm.handler100;

import com.kitty.common.utils.SpringUtils;
import com.kitty.game.base.service.BagService;
import com.kitty.game.equip.service.EquipService;
import com.kitty.game.role.model.Role;
import com.kitty.game.team.message.RespMsg;
import com.kitty.mina.message.MessagePusher;

public class NCZhuangbei implements NCGmFather {
    @Override
    public void handle(Role role, String petName) {
        int level = Integer.parseInt(petName);
        EquipService equipService = SpringUtils.getBean(EquipService.class);
        if (level > 0 && level <= 120) {
            BagService bagService = SpringUtils.getBean(BagService.class);
            short pos = bagService.getPos(role, false);
            if (pos >= 41) {
                equipService.getNotIdentifyEquip(level, role, pos);
            }
        }
        MessagePusher.pushMessage(role, new RespMsg("发送装备成功！"));
    }
}
